//    Travel US - For users of travel.usairways.com
//    intended for US Airways employees and their dependents
//    This app will help you track your flights and display
//    Availability, flight status and other non-rev info
//    Copyright (C) 2014  Renats Stozkovs
//
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with this program.  If not, see <http://www.gnu.org/licenses/>.

package com.bc004346.travelus.Model.Domain;

/**
 * Created by Renats on 1/20/14.
 * Passenger class
 */
public class Passenger implements Comparable<Passenger> {

    private String Name;
    private String Relationship;
    private String ticketNumber;

    public Passenger(String name2, String relationship2, String ticket) {
        setName(name2);
        setRelationship(relationship2);
        setTicketNumber(ticket);
    }

    public String getName() {
        return Name;
    }

    public void setName(String name) {
        Name = name;
    }

    public String getRelationship() {
        return Relationship;
    }

    public void setRelationship(String relationship) {
        Relationship = relationship;
    }

    public String getTicketNumber() {
        return ticketNumber;
    }

    public void setTicketNumber(String ticketNumber) {
        this.ticketNumber = ticketNumber;
    }

    @Override
    public int compareTo(Passenger another) {
        if (this.getName().equals(another.getName())
                && this.getRelationship().equals(another.getRelationship())
                && this.getTicketNumber().equals(another.getTicketNumber()))
            return 0;

        return this.getName().compareTo(another.getName());
    }
}
